package org.stan.beanvalidator.factory;

import org.stan.beanvalidator.annotation.BeanValidate;
import org.stan.beanvalidator.bean.PatternField;
import java.lang.reflect.Field;
import java.util.Set;

/**
 * 自定义注解工厂
 * abstract 抽象类可以被继承，不能被实现 implements
 * @author src
 * @Date 2020/6/9 9:00
 * @version 1.0
 */
public abstract class AnnotationFactoty {

    /**
     * 父方法校验bean抽象接口
     * @author src
     * @Date 2020/6/9 10:37
     * @version 1.0
     */
    public abstract void beanValidate(Field field , Object bean)throws Exception;

    /**
     * 父方法校验bean抽象接口-排除不需要校验的属性集合
     * @author src
     * @Date 2020/6/9 10:37
     * @version 1.0
     */
    public abstract void beanValidate(Field field , Object bean, Set<String> excludes)throws Exception;

    /**
     *@Description 添加新字段校验
     *@Author src
     *@Date 2020-06-13 13:47
     *@Param
     *@return
     */
    public abstract void beanValidate(Object bean, Field field , Set<PatternField> patternFields)throws Exception;

    /**
     *@Description 重载方法：基于注解校验器接口
     *@Author src
     *@Date 2020-07-04 11:12
     *@Param
     *@return
     */
    public abstract void beanValidate(Field field , Object bean, Class<?> clazz, BeanValidate beanValidate)throws Exception;

}
